import 'package:json_annotation/json_annotation.dart';
import 'package:wechat_manager/network/model/base_model.dart';

part 'access_token_model.g.dart';

@JsonSerializable()
class AccessTokenModel extends BaseModel {
  @JsonKey(name: "access_token", includeIfNull: false)
  String? accessToken;
  @JsonKey(name: "expires_in", includeIfNull: false)
  int? expiresIn;

  AccessTokenModel({this.accessToken, this.expiresIn});

  factory AccessTokenModel.fromJson(Map<String, dynamic> json) =>
      _$AccessTokenModelFromJson(json);

  Map<String, dynamic> toJson() => _$AccessTokenModelToJson(this);
}
